package com.zsj.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @Author:
 * @Date
 */
@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean registCorsFilter() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new CorsFilter());
        registration.addUrlPatterns("/console/*");
        registration.setName("corsFilter");
        registration.setOrder(0);
        return registration;
    }

}
